package ar.edu.itba.infovis.TPF.twitter;

import java.util.List;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import org.joda.time.DateTime;

import ar.edu.itba.infovis.TPF.json.CustomJSONDateTimeSerializer;

public class TweetStat implements Comparable<TweetStat> {

	private DateTime date;
	private long tweetAmount;
	private long visibility;
	private long retweets;
	private long replys;
	private List<String> tweetTextSample;
	
	public TweetStat(long tweetAmount, DateTime date, List<String> tweetTextSample, int visibility, int retweets, int replys){
		this.date = date;
		this.tweetAmount = tweetAmount;
		this.tweetTextSample = tweetTextSample;
		this.visibility = visibility;
		this.retweets = retweets;
		this.replys = replys;
	}
	
	@JsonSerialize(using = CustomJSONDateTimeSerializer.class)
	public DateTime getDate() {
		return date;
	}

	@JsonProperty(value="amount")
	public long getTweetAmount() {
		return tweetAmount;
	}

	@JsonProperty(value="sample")
	public List<String> getTweetTextSample() {
		return tweetTextSample;
	}
	
	@JsonProperty(value="visibility")
	public long getVisibility() {
		return visibility;
	}
	
	@JsonProperty(value="retweets")
	public long getRetweets() {
		return retweets;
	}
	
	@JsonProperty(value="replys")
	public long getReplys() {
		return replys;
	}

	@Override
	public int compareTo(TweetStat o) {
		return this.getDate().compareTo(o.getDate());
	}
	
}
